import request from '@/utils/request'
// 获取权限列表信息
export function getPermList() {
  return request({
    url: '/sys/permission'
  })
}

// 根据id删除权限点
export function delPerm(id) {
  return request({
    url: `/sys/permission/${id}`,
    method: 'delete'
  })
}

// 新增权限点
export function addPerm(data) {
  return request({
    url: '/sys/permission',
    method: 'post',
    data
  })
}

// 根据id获取权限详情
export function getPermById(id) {
  return request({
    url: `/sys/permission/${id}`
  })
}

// 根据id更新权限详情
export function updatePerm(id, data) {
  return request({
    url: `/sys/permission/${id}`,
    method: 'put',
    data
  })
}
